import request from '@/utils/request'

// 创建预约项目
export function createAppointmentItem(data) {
  return request({
    url: '/lfd/appointment-item/create',
    method: 'post',
    data: data
  })
}

// 更新预约项目
export function updateAppointmentItem(data) {
  return request({
    url: '/lfd/appointment-item/update',
    method: 'put',
    data: data
  })
}

// 删除预约项目
export function deleteAppointmentItem(id) {
  return request({
    url: '/lfd/appointment-item/delete?id=' + id,
    method: 'delete'
  })
}

// 获得预约项目
export function getAppointmentItem(id) {
  return request({
    url: '/lfd/appointment-item/get?id=' + id,
    method: 'get'
  })
}

// 获得预约项目分页
export function getAppointmentItemPage(query) {
  return request({
    url: '/lfd/appointment-item/page',
    method: 'get',
    params: query
  })
}

// 导出预约项目 Excel
export function exportAppointmentItemExcel(query) {
  return request({
    url: '/lfd/appointment-item/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
